﻿Imports MeoTom.Core.BLL
Imports System.IO
Imports Microsoft.ApplicationBlocks.Data

Namespace DAL
    Public Class VoteProvider
        Inherits DataAccess
        Private util As New MeoTom.Core.Utilities.Common()

        Public Sub New()

        End Sub

        Public Function UpVote(ByVal v As Votes) As SqlClient.SqlDataReader
            Dim param(3) As SqlClient.SqlParameter
            param(0) = New SqlClient.SqlParameter("@ArticleID", SqlDbType.VarChar, 50)
            param(0).Value = v.ArticleID
            param(1) = New SqlClient.SqlParameter("@Votes", SqlDbType.Float, 4)
            param(1).Value = v.Votes
            param(2) = New SqlClient.SqlParameter("@TotalRating", SqlDbType.Int, 4)
            param(2).Value = v.TotalRating

            Return SqlHelper.ExecuteReader(strConn, CommandType.StoredProcedure, "Justin_ArticleVote_Create", param)
        End Function
    End Class
End Namespace
